//计算一致字符串
const allowed: string = 'ab';
const words = ["ad", "bd", "aab", "baa", "badab"]
function findStr(allowed: string, words: string[]): number {
    let count: number = 0
    for (let i = 0; i < words.length; i++) {
        let arr: string[] = words[i].split('')
        let flag: boolean = arr.every((item) => {
            return allowed.includes(item)
        })
        if (flag) {
            count++
        }
    }
    return count
}

console.log(findStr(allowed, words))